<template>
  <div id="history">
    <div class="history_header">
      <div class="header_tabs">
        <div class="tabs-header">
          <div
            v-for="(tab, index) in tabs"
            :key="index"
            :class="['tab-item', { active: activeTab === index }]"
            @click="activeTab = index"
          >
            {{ tab.title }}
            <div class="tab-highlight" v-if="activeTab === index"></div>
          </div>
        </div>
      </div>
    </div>

    <div style="flex: 1; display: flex; flex-direction: column; height: 85.2%">
      <reportManager v-if="activeTab == '0'"></reportManager>
      <automaticPrintSetting v-if="activeTab == '1'"></automaticPrintSetting>
      <bookMarkSet v-if="activeTab == '2'"></bookMarkSet>
    </div>
  </div>
</template>

<script>
export default {
  name: 'App',
  components: {},
  data() {
    return {
      theme: 'light',
      tabs: [
        {
          title: this.$t('ReportData.Report_Manager'),
          //  title: 'Alarm history',
          name: 'reportManager',
        },
        {
          title: this.$t('ReportData.Automatic_Printing_Settings'),
          // title: 'State history',
          name: 'automaticPrintSetting',
        },
        {
          title: this.$t('ReportData.Book_Mark_Set'),
          // title: 'Operations history',
          name: 'bookMarkSet',
        },
      ],
      activeTab: 0,
    }
  },
}
</script>

<style lang="scss">
@import '@/assets/resetcss/theme.scss';

/* 仅修改标签页相关样式，其他样式保留您原有代码 */
.tabs-header {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.8);
  padding-left: 60px; /* 第一个文字到左侧距离60px */
  height: 72px; /* 25px(上边距) + 18px(文字) + 27px(下边距) */
}

.tab-item {
  position: relative;
  text-align: center;
  cursor: pointer;
  color: #666;
  transition: all 0.3s;
  font-size: 18px; /* 文字大小18px */
  margin-right: 60px; /* 标签之间距离60px */
  height: 100%;
  line-height: 72px; /* 垂直居中 */
}

.tab-item.active {
  color: rgba(47, 166, 74, 1);
}

.tab-highlight {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px; /* 高亮宽度88px */
  height: 2px; /* 高亮高度2px */
  background: rgba(47, 166, 74, 1); /* 高亮颜色 */
}

/* 以下为您原有代码的其他样式，完全保留 */
.history_header {
  height: 14.8%;
  position: relative;
  background-image: url('@/assets/image/backgroundImage.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding-bottom: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;

  .header_tabs {
    margin-top: 100px;
    width: 89.5%;
  }
}

#vue503 {
  z-index: 9999;
  background: #fff;
  position: absolute;
  left: 0%;
  right: 0;
  top: 0%;
  bottom: 0;
  overflow: hidden;

  .texta {
    position: absolute;
    font-size: 16px;
    color: #ff0000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;

    span {
      display: block;
    }

    .imgBox {
      width: 360px;
      height: 360px;

      img {
        width: 100%;
      }
    }
  }
}

.el-select-dropdown.is-multiple,
.el-select-dropdown__item.selected {
  @include textColor();
  font-weight: 500;
  font-family: 'PingFangSC';
}

.el-select-dropdown__item {
  font-size: 12px;
  height: 28px;
  line-height: 28px;
}

.el-popover {
  .detail-cancel {
    @include textColor();
    font-family: PingFangSC;
  }

  .detail-acknow {
    @include btnMain-color();
    color: #fff;
    font-family: PingFangSC;
    width: 60px;
    height: 24px;
    padding: 0;
    border-radius: 4px;
    text-align: center;
    line-height: 24px;
  }

  .detail-acknow:hover {
    @include btnMain-hovcolor();
    color: #ffffff;
  }

  .detelevisible-cancel {
    @include textColor();
    font-family: PingFangSC;
  }

  .detelevisible-acknowledge {
    @include btnMain-color();
    color: #fff;
    font-family: PingFangSC;
    width: 60px;
    height: 24px;
    padding: 0;
    border-radius: 4px;
    text-align: center;
    line-height: 24px;
  }

  .detelevisible-acknowledge:hover {
    @include btnMain-hovcolor();
    color: #ffffff;
  }
}

.el-dialog__header .el-dialog__title {
  font-size: 14px;
}

.el-message-box__header .el-message-box__title {
  font-size: 14px;
}

.el-dialog__headerbtn:focus .el-dialog__close,
.el-dialog__headerbtn:hover .el-dialog__close {
  @include btnSecondary-tabscolor();
}

.el-message-box__headerbtn:focus .el-message-box__close,
.el-message-box__headerbtn:hover .el-message-box__close {
  @include btnSecondary-tabscolor();
}

.v-modal {
  background-color: transparent !important;
}

.el-textarea__inner:focus {
  @include checkbox-hover();
}

.el-picker-panel__body-wrapper {
  .el-date-table td.end-date span,
  .el-date-table td.start-date span {
    @include btnSecondary-tabsborder();
  }
}

.el-date-table td.available:hover {
  @include btnSecondary-tabscolor();
}

.el-date-table td.today span {
  @include btnSecondary-tabscolor();
}

.el-message-box__btns .el-button--default:hover {
  @include btndelet-hovcolor;
}

.el-message-box__btns .el-button--primary {
  @include checkbox();
  color: #fff;
}

.el-message-box__btns .el-button--primary:hover {
  @include btnMain-hovcolor();
  color: #fff !important;
}

#history {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 1100px;
  background: #fff;
  overflow-y: auto;
  position: absolute;
  top: -7px;
  bottom: 0;
  overflow: hidden;

  .el-select .el-input__inner:focus {
    @include checkbox-hover();
  }

  .btn-main {
    @include btnMain-color();
    color: #ffffff;
    border: 0;
    width: 74px;
    height: 26px;
    padding: 0;
    border-radius: 4px;
    text-align: center;
    line-height: 26px;
    cursor: pointer;
    font-family: PingFangSC;
  }

  .btn-main:hover {
    @include btnMain-hovcolor();
    color: #ffffff;
  }

  .btn-main:focus {
    @include btnMain-color();
    color: #ffffff;
  }

  .btn-minor {
    @include btnminor-color();
    border: 0;
    width: 74px;
    height: 26px;
    border-radius: 4px;
    padding: 0;
    text-align: center;
    line-height: 26px;
    cursor: pointer;
    font-family: PingFangSC;
  }

  .btn-minor:hover {
    @include btnminor-hovcolor();
  }

  .btn-minor:focus {
    @include btnminor-hovcolor();
  }

  textarea::-webkit-input-placeholder {
    font-family: PingFangSC;
  }

  textarea::-moz-placeholder {
    font-family: PingFangSC;
  }

  textarea:-moz-placeholder {
    font-family: PingFangSC;
  }

  textarea:-ms-input-placeholder {
    font-family: PingFangSC;
  }

  .el-button--text {
    @include textColor();
  }

  .el-tabs {
    width: 100%;
    height: 100%;
  }

  .el-tabs__header {
    padding: 0;
    position: absolute;
    margin: 0;
    left: 26px;
    right: 26px;
  }

  .el-tabs__content {
    overflow: hidden;
    width: 100%;
    height: 100%;
    position: relative;
  }

  .el-tabs__item.is-active {
    @include btnSecondary-tabscolor();
  }

  .el-tabs__item:hover {
    @include btnSecondary-tabscolor();
  }

  .el-tabs__active-bar {
    @include btnSecondary-tabsborder();
  }

  .el-dialog {
    border-radius: 4px;
  }

  .el-dialog__header {
    padding: 10px 20px 10px;
  }

  .el-dialog__headerbtn {
    top: 12px;
  }

  .el-dialog__body {
    padding: 0 20px;
  }

  .el-tabs__nav-wrap::after {
    background-color: rgba(208, 214, 222, 0.3);
  }

  .el-checkbox__input.is-disabled .el-checkbox__inner {
    background-color: #fff;
  }

  .el-checkbox__input.is-checked .el-checkbox__inner,
  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
    @include checkbox();
  }

  .el-checkbox__inner:hover {
    @include checkbox-hover();
  }

  .el-checkbox__input.is-focus .el-checkbox__inner {
    @include checkbox-hover();
  }

  .el-input--small .el-input__inner {
    height: 26px;
    line-height: 26px;
  }

  .el-input__inner {
    font-family: PingFangSC;
    font-weight: 400;
  }

  .el-select .el-input.is-focus .el-input__inner {
    @include checkbox-hover();
  }

  .el-select-dropdown__item.selected {
    @include textColor();
  }

  .el-range-editor--small.el-input__inner {
    height: 26px;
    line-height: 26px;
  }

  .el-range-editor--small .el-range__close-icon,
  .el-range-editor--small .el-range__icon {
    line-height: 20px;
  }

  .el-range-editor--small .el-range-separator {
    line-height: 20px;
  }

  .el-date-editor .el-range-separator {
    padding: 0;
  }

  .el-date-editor .el-range-input {
    font-family: PingFangSC;
    font-weight: 400;
  }
}
</style>
